# dmitry.a.konovalov@gmail.com dmitry.konovalov@jcu.edu.au

#We don't need to clean up when we're making these targets
#NODEPS:=clean
.PHONY: all clean  # ignore file named 'all'?
%.o : %.mod  # dealing with gfortran bug

SRCS  = $(SRC_DIR)/tsv2012_test_main.f95
#SRCS  = tsv2012_test_main.f95
#SRCS  := $(addprefix $(SRC2_DIR)/, $(SRCS))
OBJS  := $(SRCS:.$(SRC_EXT)=.o)
OBJS  := $(notdir $(OBJS))
OBJS  := $(addprefix $(OBJ_DIR)/, $(OBJS))

$(TRGT_EXE) : $(OBJS) 
	@echo "(TRGT_EXE) : (OBJS)"
	@echo "  TO  =(TRGT_EXE)=" "$@"
	@echo "  FROM=(OBJS)=" "$<"
	@echo "  ok"
	$(CF) -s $(TRGT_LIB) $(OBJS) -o $@
#	$(CF) -s $(OBJS) -o $@
    
#This rule does the compilation
$(OBJ_DIR)/%.o :  $(SRC_DIR)/%.$(SRC_EXT) 
	@echo ".o:  .(SRC_EXT)"
	@echo "  TO  =.o=" "$@"
	@echo "  FROM=.(SRC_EXT)=" "$<"
	$(CF) $(CFLAGS) -c $< -o $@ -J $(OBJ_DIR) 
	@echo "  ok"; 


	
	
	
